import os

## 拼接路径
path1 = "D:/"
path2 = "[2025NCI]/01dev/"
full_path = os.path.join(path1, path2)
print(full_path)

## 检查路径是否存在
print(os.path.exists(full_path))

## 判断是否是绝对路径
print(os.path.isabs(full_path))

## 获取文件名和目录
fill_path = "D:/[2025NCI]/01dev/aaa.txt"
print(f"文件名是 {os.path.basename(fill_path)}")
print(f"目录是： {os.path.dirname(fill_path)}")

## 获取绝对路径
relative_path = "hello.txt"
print(os.path.abspath(relative_path))

## 获取文件大小
print(f"这个文件是 {os.path.getsize(fill_path)} 字节")
